<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ page import="java.util.Date"%>
<%Long time = new Date().getTime();
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<!DOCTYPE html>
<html>
<head>
    <title>数据魔方节点监控系统</title>
    <base href="<%=basePath%>">
	<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
	<%@ include file="/pages/common/header.jsp"%>
    <link href="<c:url value='/css/security.css' />"   rel="stylesheet">
    <link href="<c:url value='/css/organisation.css' />?time=<%=time%>" rel="stylesheet">
</head> 
<body>
	<div class="g-head">
	    <nav class="navbar navbar-default">
	        <a class="navbar-brand" href="#" style="width: 390px;"><img style="width: 200px;" src="<c:url value='/images/global.logo.png'/>"/>节点监控系统</a>
	        <div class="collapse navbar-collapse navbar-ex1-collapse">
	            <div class="btn-group navbar-right">
	               
	            </div>
	        </div>
	    </nav>
	</div>
	<div class="container-fluid">
	<div class="row-fluid">
		<div class="span12">
			<ul class="nav nav-tabs">
				<li id="home" class="active">
					<a id="home_a">首页</a>
				</li>
				<li id="taskList">
					<a id="list_a">任务清单</a>
				</li>
				<li id="taskBill">
					<a id="bill_a">任务统计</a>
				</li>
				<li id="proxyIpBill">
					<a id="bill_ip">代理IP统计</a>
				</li>
			</ul>
		</div>
	</div>
	<div class="page-header" id="content">
			
	</div>
</div>
	
	<div id="footer" class="g-foot">
	    <span>Copyright © 2011-2013 恒拓运价魔方</span>
	</div>
	
</body>
</html>
<script type="text/javascript">
$(function(){
	open("home");
	$("#home_a").on("click", function(){
		open("home");
	});
	$("#list_a").on("click", function(){
		open("list");
	});
	$("#bill_a").on("click", function(){
		open("bill");
	});
	$("#bill_ip").on("click", function(){
		open("proxyIp");
	});
});
	function open(page){
		var url = "";
		if(page == "home"){
			$("#home").addClass("active");
			$("#taskList").removeClass("active");
			$("#taskBill").removeClass("active");
			$("#proxyIpBill").removeClass("active");
			url = "pages/monitor/environment-list.jsp";
		} else if(page == "list"){
			$("#home").removeClass("active");
			$("#taskList").addClass("active");
			$("#taskBill").removeClass("active");
			$("#proxyIpBill").removeClass("active");
			url = "pages/monitor/task-list.jsp";
		} else if(page == "bill"){
			$("#home").removeClass("active");
			$("#taskList").removeClass("active");
			$("#taskBill").addClass("active");
			$("#proxyIpBill").removeClass("active");
			url = "pages/monitor/task-bill.jsp";
		} else if(page == "proxyIp"){
			$("#home").removeClass("active");
			$("#taskList").removeClass("active");
			$("#taskBill").removeClass("active");
			$("#proxyIpBill").addClass("active");
			url = "pages/monitor/proxy-ip-bill.jsp";
		}
		util.mofangAjax({
			url : url,
			dataType : "html",
			succFun : function(html){
				$("#content").html(html);
			}
		});
	}
</script>